package cn.wolfcode.trip.app.web.controller;

import cn.wolfcode.trip.base.domain.StrategyDetail;
import cn.wolfcode.trip.base.service.IStrategyDetailService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@RequestMapping("/strategyDetails")
@Controller
public class StrategyDetailController {
    @Autowired
    private IStrategyDetailService strategyDetailService;

    //获取某一篇攻略文章
    @GetMapping("/{id}")
    @ResponseBody
    public Object get(@PathVariable Long id){
        StrategyDetail strategyDetail = strategyDetailService.get(id);
        return strategyDetail;
    }
}
